# This is where we defined the hashes of valid_attributes for creating valid models
#
# see ValidActiveRecordAttributes for usage
module ValidModelAttributes
  def backup_example_type_for_specs
    backup
  end
  def backup
    {
      :name => 'A Cool Backup',
      :dependencies => %w( user )
    }
  end
  def user
    {
      :login => 'cool_user',
      :email => 'cool@user.com',
      :password => 'testing',
      :password_confirmation => 'testing'
    }
  end
end

# Gives us a pretty syntax for getting valid attributes: ValidAttributesFor.model_name
class ValidAttributesFor
  extend ValidModelAttributes

  def self.method_missing *args
    raise "No valid attributes defined for model: #{args.first}"
  end
end
